export class StatusBar {
    root = document.createElement("footer");
    private store = new Map<string, HTMLElement>();
    addStatus(id: string) {
        if (this.store.has(id)) return this.store.get(id)!;
        const status = document.createElement("nav");
        status.id = id;
        this.store.set(id, status);
        this.root.appendChild(status);
        return status;
    }
    destroy() {
        [...this.store.values()].forEach((i) => {
            i.remove();
        });
        this.store.clear();
    }
}
